/**
结构体
*/
package main

import "fmt"

//type Student struct {
//	id   int
//	name string
//	age  int
//}
//
//func main() {
//	stu1 := new(Student)
//	stu2 := Student{age: 100, name: "ZS", id: 1}
//	stu3 := Student{2, "LS", 99}
//	stu4 := new(Student)
//	stu4.id = 3
//	stu4.name = "WW"
//	stu4.age = 100
//	fmt.Println(stu1)
//	fmt.Println(stu2)
//	fmt.Println(stu3)
//	fmt.Println(stu4)
//}



type name struct {
	firstName string
	lastName string
}


func main() {
	name1 := name{"Steve", "Jobs"}
	name2 := name{"Steve", "Jobs"}
	if name1 == name2 {
		fmt.Println("name1 and name2 are equal")
	} else {
		fmt.Println("name1 and name2 are not equal")
	}

	name3 := name{firstName:"Steve", lastName:"Jobs"}
	name4 := name{}
	name4.firstName = "Steve"
	if name3 == name4 {
		fmt.Println("name3 and name4 are equal")
	} else {
		fmt.Println("name3 and name4 are not equal")
	}
}